package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.ActiveSendCouponDto;
import com.shensi.api.admin.domian.station.dto.CustomerLabelDemoDto;
import com.shensi.api.admin.domian.station.dto.SendMessageDto;
import com.shensi.api.admin.domian.station.dto.SendMessageSelectDto;
import com.shensi.api.admin.domian.station.dto.SysAppUserInfoDto;
import com.shensi.api.admin.domian.station.vo.AppUserNumberVo;
import com.shensi.api.admin.domian.system.SysLogininfor;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.domain.ResultData;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface AppUserInfoClient {


    @PostMapping("/appUserInfo/info/increaseShareCount")
    public void increaseShareCount(@RequestParam("userId") Long userId);

    @GetMapping("/appUserInfo/info/getShareCount")
    public Integer getShareCountByUserId(@RequestParam("userId") Long userId);

    /**
     * 查询会员信息列表
     */
    @GetMapping("/appUserInfo/info/list")
    public TableDataInfo list(@SpringQueryMap SysAppUserInfoDto appUserInfo);


    /**导出会员信息列表*/
    @GetMapping("/appUserInfo/info/exportList")
    public AjaxResult exportList(@SpringQueryMap SysAppUserInfoDto appUserInfo);


    /**
     * 手动发券查询会员信息列表
     */
    @GetMapping("/appUserInfo/info/listForCoupon")
    public TableDataInfo listForCoupon(@SpringQueryMap CustomerLabelDemoDto customerLabelDemo);

    /**
     * 获取会员信息详细信息
     */
    @GetMapping(value = "/appUserInfo/info/selectAppUserInfoSum")
    public AjaxResult selectAppUserInfoSum(@SpringQueryMap SysAppUserInfoDto appUserInfo);

    /**
     * 新增会员
     */
    @PostMapping("/appUserInfo/info")
    public AjaxResult add(@RequestBody SysAppUserInfoDto appUserInfo);

    /**
     * 新增会员
     */
    @PostMapping(value = "/appUserInfo/info/addAppUserPoints")
    public AjaxResult addAppUserPoints(@RequestBody SysAppUserInfoDto appUserInfo);

    /**
     * 发送模针对用户
     */
    @PostMapping(value = "/appUserInfo/info/sendMessageToUser")
    public AjaxResult sendMessageToUser(@RequestBody SendMessageDto sendMessage);

    /**
     * 发送模针对用户
     */
    @PostMapping(value = "/appUserInfo/info/sendUserToYunHua")
    public AjaxResult sendUserToYunHua(@RequestBody SysAppUserInfoDto sysAppUserInfo);

    @PostMapping(value = "/appUserInfo/info/activeSendMessage")
    public AjaxResult activeSendMessage(@RequestBody ActiveSendCouponDto activeSendCoupon);

    /**
     * 根据已知的条件进行筛选
     */
    @PostMapping(value = "/appUserInfo/info/selectSendMessage")
    public AjaxResult selectSendMessage(@RequestBody SendMessageSelectDto sendMessageSelect);

    /**
     * 清除redis缓存信息
     */
    @PostMapping(value = "/appUserInfo/info/clearAppId")
    public AjaxResult clearAppId();

    /**
     * 查询客户电子会员卡充值消费记录列表
     */
    @GetMapping("/appUserInfo/info/listUseRecordByAppUserInfo")
    public TableDataInfo listUseRecordByAppUserInfo(@SpringQueryMap SysAppUserInfoDto appUserInfo);

    /**
     * 导出会员列表
     */
    @GetMapping("/appUserInfo/info/export")
    public AjaxResult export(@SpringQueryMap SysAppUserInfoDto appUserInfo);

    @PostMapping("/appUserInfo/info/importData")
    public AjaxResult importData(@RequestParam("file") MultipartFile file,@RequestParam("updateSupport") boolean updateSupport);

    /**
     * 获取导出会员信息模板
     */
    @GetMapping("/appUserInfo/info/importTemplate")
    public AjaxResult importTemplate();

    /**
     * 获取会员信息详细信息
     */
    @GetMapping(value = "/appUserInfo/info/{appUserInfoId}")
    public AjaxResult getInfo(@PathVariable("appUserInfoId") Long appUserInfoId);

    /**
     * 修改会员信息
     */
    @PutMapping("/appUserInfo/info")
    public AjaxResult edit(@RequestBody SysAppUserInfoDto appUserInfo);

    @GetMapping("/appUserInfo/info/getAppUserNumber")
    public AppUserNumberVo getAppUserNumber(@ApiParam(value = "开始时间") @RequestParam(value = "beginTime",required = false) String beginTime,
                                            @ApiParam(value = "结束时间") @RequestParam(value = "endTime",required = false) String endTime);
    @PostMapping("/appUserInfo/info/updateUserMemberCode")
    public AjaxResult updateUserMemberCode(@ApiParam(value = "油企id") @RequestParam(value = "enterpriseId")Long enterpriseId);

    @GetMapping("/appUserInfo/info/restPassword")
    public ResultData restAppUserPassword(@ApiParam("会员userId") @RequestParam("userId") Long userId);

}
